package com.hl233.system.singleton;

/**
 * 饿汉单例
 * @author 张振强15065206763
 * @create 2024-09-11
 */
public class Singleton {
    //私有化构造方法
    private Singleton(){

    }
    //创建类对象
    private static Singleton instance = new Singleton();
    //对外提供静态方法获取该对象
    public static Singleton getInstance(){
        return instance;
    }
}
